package com.lixinyue.test04;

/**
 * @program: 11.12
 * @description:
 * @author: 李鑫月
 * @create: 2021-11-12 19:06
 **/
abstract class User {
    private  String name;
    public User(String name){
        this.name=name;
    }
    public abstract void func();
    public String getName(){
        return this.name;
    }
}
class Admin extends User{
    public Admin(String name){
        super(name);
    }

    @Override
    public void func() {
    }
}
public class Test {
    public static void main(String[] args) {
        User user=new Admin("lixinyue");
        System.out.println(user.getName());
    }
}
